<?php
/**
 * Talents come from diligence, and knowledge is gained by accumulation.
 *
 * @author: 晋<657306123@qq.com>
 */

namespace Xin\Filesystem;

interface CloudStorageInterface{

	/**
	 * 获取上传令牌
	 *
	 * @param string $key
	 * @param int    $expires
	 * @param mixed  $policy
	 * @param bool   $strictPolicy
	 * @return mixed
	 */
	public function getUploadToken($key = null, $expires = 3600, $policy = null, $strictPolicy = true);

	/**
	 * 获取私有下载链接
	 *
	 * @param string $baseUrl
	 * @param int    $expires
	 * @return mixed
	 */
	public function getPrivateFileUrl($baseUrl, $expires = 3600);

	/**
	 * @return mixed
	 */
	public function getLastError();
}
